﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>消费结算列表</title>
<#include "/admin/common_css.ftl">
<#include "/admin/common_js.ftl">
<script type="text/javascript" src="${base}/apache/common/js/jquery.pager.js"></script>
<script type="text/javascript">
$(document).ready(function() {

	var $deleteCostButton = $("#listTable .deleteCostButton");

	// 删除商品分类
	$deleteCostButton.click( function() {
		if (confirm("您确定要删除此结算信息吗?") == false) {
			return false;
		}
	});
	});
	</script>
</head>
<body class="list">
	<div class="bar">
		费用结算列表&nbsp;总记录数: ${pager.totalCount} (共${pager.pageCount}页)
	</div>
	<div class="body">
		<form id="listForm" action="${base}/faith/reserve/costsearch" method="post">
			<div class="listBar">
				<label style="font-weight:bold;">预约人帐号: </label>
				<input type="text"  class='searchText' name="member.username" value="${(param.member.username)!}" />
				<label style="font-weight:bold;">预约人姓名: </label>
				<input type="text"  class='searchText' name="member.realName" value="${(param.member.realName)!}" />
				<label style="font-weight:bold;">仪器名称: </label>
				<input type="text" class="searchText" name="device.propertyName" value="${(device.propertyName)!}" />
				<label style="font-weight:bold;">结算情况: </label>
				<select name="chargeStatus">
					<option value="" <#if !(reservation.chargeStatus)??> selected</#if> >
						请选择
					</option>
					<option value="1" <#if reservation != null&&reservation.chargeStatus == 1> selected</#if>>
						已结算
					</option>
					<option value="2" <#if reservation != null&&reservation.chargeStatus == 2> selected</#if>>
						未结算
					</option>
				</select>
				<input type="button" id="searchButton" class="formButton" value="搜 索" hidefocus />
			</div>
			<table id="listTable" class="listTable">
				<tr>
					<th>
						<a href="#" class="sort" name="classifyName" hidefocus>预约人帐号</a>
					</th>
					<th>
						<a href="#" class="sort" name="classifyName" hidefocus>预约人姓名</a>
					</th>
					<th>
						<a href="#" class="sort" name="classifyName" hidefocus>预约人电话</a>
					</th>
					<th>
						<a href="#" class="sort" name="classifyName" hidefocus>仪器编号</a>
					</th>
					<th>
						<a href="#" class="sort" name="propertyName" hidefocus>仪器名称</a>
					</th>
					<th>
						<a href="#" class="sort" name="deviceFunc" hidefocus>费用类型</a>
					</th>
					<th>
						<a href="#" class="sort" name="deviceFunc" hidefocus>样品个数</a>
					</th>
					<th>
						<a href="#" class="sort" name="location" hidefocus>预约开始时间</a>
					</th>
					<th>
						<a href="#" class="sort" name="specificationType" hidefocus>预约结束时间</a>
					</th>
					<th>
						<a href="#" class="sort" name="location" hidefocus>预算</a>
					</th>
					<th>
						<a href="#" class="sort" name="location" hidefocus>决算</a>
					</th>
					<th>
						<a href="#" class="sort" name="location" hidefocus>结算情况</a>
					</th>
					<th>
						<span>操作</span>
					</th>
				</tr>
				<#list pager.result as reservation>
					<tr>
						<td>
							${(reservation.member.username)!}
						</td>
						<td>
							${(reservation.member.realName)!}
						</td>
						<td>
							${(reservation.member.telephone)!}
						</td>
						<td>
							${(reservation.device.classifyId)!}
						</td>
						<td>
							${(reservation.device.propertyName)!}
						</td>
						<td>
							<#if reservation.costType == 1>按时间计费
								<#elseif reservation.costType == 2>按样品数量计费
								<#else>未描述
							</#if>
						</td>
						<td>
						    <#if (reservation.sampleCount)??>${reservation.sampleCount}个样品
								<#else>按时间计费
							</#if>
						</td>
						<td>
							${(reservation.beginDate)!}
						</td>
						<td>
							${(reservation.endDate)!}
						</td>
						<td>
							${(reservation.budget)!0}
						</td>
						<td>
							${(reservation.revenue)!0}
						</td>
						<td>
							<#if reservation.chargeStatus == 1>已结算
							<#elseif reservation.chargeStatus = 2>未结算
							</#if>
						</td>
						<td>
						    <a href="costedit/${reservation.id}" title="修改决算">[修改决算]</a>
						</td>
					</tr>
				</#list>
			</table>
			<#if (pager.result?size > 0)>
				<div class="pagerBar">
					<div class="pager">
						<#include "admin/pager.ftl" />
					</div>
				<div>
			<#else>
				<div class="noRecord">没有找到任何记录!</div>
			</#if>
		</form>
	</div>
</body>
</html>